package com.ruoyi.fs.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fs.mapper.FsWorkOrderPostMapper;
import com.ruoyi.fs.domain.FsWorkOrderPost;
import com.ruoyi.fs.service.IFsWorkOrderPostService;

/**
 * 邮寄工单Service业务层处理
 * 
 * @author hero
 * @date 2024-10-28
 */
@Service
public class FsWorkOrderPostServiceImpl implements IFsWorkOrderPostService 
{
    @Autowired
    private FsWorkOrderPostMapper fsWorkOrderPostMapper;

    /**
     * 查询邮寄工单
     * 
     * @param id 邮寄工单主键
     * @return 邮寄工单
     */
    @Override
    public FsWorkOrderPost selectFsWorkOrderPostById(Long id)
    {
        return fsWorkOrderPostMapper.selectFsWorkOrderPostById(id);
    }

    /**
     * 查询邮寄工单列表
     * 
     * @param fsWorkOrderPost 邮寄工单
     * @return 邮寄工单
     */
    @Override
    public List<FsWorkOrderPost> selectFsWorkOrderPostList(FsWorkOrderPost fsWorkOrderPost)
    {
        return fsWorkOrderPostMapper.selectFsWorkOrderPostList(fsWorkOrderPost);
    }

    /**
     * 新增邮寄工单
     * 
     * @param fsWorkOrderPost 邮寄工单
     * @return 结果
     */
    @Override
    public int insertFsWorkOrderPost(FsWorkOrderPost fsWorkOrderPost)
    {
        fsWorkOrderPost.setCreateTime(DateUtils.getNowDate());
        return fsWorkOrderPostMapper.insertFsWorkOrderPost(fsWorkOrderPost);
    }

    /**
     * 修改邮寄工单
     * 
     * @param fsWorkOrderPost 邮寄工单
     * @return 结果
     */
    @Override
    public int updateFsWorkOrderPost(FsWorkOrderPost fsWorkOrderPost)
    {
        fsWorkOrderPost.setUpdateTime(DateUtils.getNowDate());
        return fsWorkOrderPostMapper.updateFsWorkOrderPost(fsWorkOrderPost);
    }

    /**
     * 批量删除邮寄工单
     * 
     * @param ids 需要删除的邮寄工单主键
     * @return 结果
     */
    @Override
    public int deleteFsWorkOrderPostByIds(Long[] ids)
    {
        return fsWorkOrderPostMapper.deleteFsWorkOrderPostByIds(ids);
    }

    /**
     * 删除邮寄工单信息
     * 
     * @param id 邮寄工单主键
     * @return 结果
     */
    @Override
    public int deleteFsWorkOrderPostById(Long id)
    {
        return fsWorkOrderPostMapper.deleteFsWorkOrderPostById(id);
    }
}
